package com.jtkj.action;

import java.io.PrintWriter;

import javax.faces.application.Application;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;

public class LoginAction extends ActionSupport {

	private static final long serialVersionUID = 1L;

	@Override
	public String execute() throws Exception {
		
		HttpServletRequest request = ServletActionContext.getRequest();
		
		StringBuffer sb = new StringBuffer();
		
		String username = java.net.URLDecoder.decode(request.getParameter("username"), "UTF-8");

		request.getSession().setAttribute("userName", username);
		
		return "success";
	}

	
	
	
}
